package com.atguigu.genericity;

/**
 * @program: IDEAcode
 * @description:
 * @author: Mr.zjx
 * create: 2021-07-25-18-19
 **/
public class Test {
    public static void main(String[] args) {
        //指定QQ为String类型，即所有QQ变为String类型
        Factory<String> f1 = new Factory<String>();
        f1.setName("angang");
        String name = f1.getName();
        System.out.println("name = " + name);

        Factory<Double> f2 = new Factory<Double>();
        f2.setName(10.5);
        Double f2name = f2.getName();
        System.out.println("f2name = " + f2name);

        f1.myMethod2(true);
        Factory.myMethod(1);
    }
}
